function init() {
  chrome.runtime.onMessege.addListener((request, sender, sendResponse) => {
    console.log("xxx");
  });
}
function getCurrentTabId(callback) {
  chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
    if (callback) {
      callback(tabs.length ? tabs[0].id : null);
    }
  });
}
function send(message) {
  return new Promise((resolve) => {
    chrome.runtime.sendMessage(message, (res) => {
      resolve(res);
    });
  });
}

export default {
  init,
  send,
};
